home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.11 Nov 91 / TLink THINK Pascal code / LinkDemo.r < prev    next >
Encoding:
Text File  |  1990-11-26  |  3.0 KB  |  162 lines  |  [TEXT/MSWD]

  1. /* Copyright © 1988-1990 Apple Computer, Inc.  All rights reserved. */
  2.  
  3. /* • Auto-Include the requirements for this source */
  4. #ifndef __TYPES.R__
  5. #include "Types.r"
  6. #endif
  7.  
  8. #ifndef __MacAppTypes__
  9. #include "MacAppTypes.r"
  10. #endif
  11.  
  12. #if qDebug
  13. include "Debug.r.o";
  14. #endif
  15. include "MacApp.r.o";
  16. include "Dialog.r.o";
  17.  
  18. /* Resource IDs */
  19.  
  20.  
  21. /* Command numbers */
  22.  
  23. #define cNewWindow        1001
  24.  
  25. resource 'seg!' (256, purgeable) {
  26.     {
  27.         "GOpen";
  28.         "GClose";
  29.         "GNonRes";
  30.         "GSelCommand";
  31.         "GDoCommand"
  32.     }
  33. };
  34.  
  35. resource 'SIZE' (-1) {
  36.     dontSaveScreen,
  37.     acceptSuspendResumeEvents,
  38.     enableOptionSwitch,
  39.     canBackground,
  40.     MultiFinderAware,
  41.     backgroundAndForeground,
  42.     dontGetFrontClicks,
  43.     ignoreChildDiedEvents,
  44.     is32BitCompatible,
  45.     reserved,
  46.     reserved,
  47.     reserved,
  48.     reserved,
  49.     reserved,
  50.     reserved,
  51.     reserved,
  52. #if qDebug
  53.     500 * 1024,
  54.     400 * 1024
  55. #else
  56.     290 * 1024,
  57.     218 * 1024
  58. #endif
  59. };
  60.  
  61. resource 'DITL' (phAboutApp, purgeable) {
  62.      {
  63. /* [1] */    {160, 182, 180, 262}, Button { enabled, "OK" };
  64. /* [2] */    {8, 70, 152, 316}, StaticText { disabled, 
  65.     "This program demonstrates simultaneous updating of several TextEdits." 
  66.     "\n\nThis program was written by Scott Steketee "
  67.     "with MacApp® © 1985-1990 Apple Computer, Inc."};
  68. /* [3] */    {10, 20, 42, 52}, Icon { disabled, 1 }
  69.     }
  70. };
  71.  
  72. resource 'ALRT' (1000, purgeable) {
  73.     {44, 48, 130, 358},
  74.     1000,
  75.     {
  76.         OK, visible, sound1,
  77.         OK, visible, sound1,
  78.         OK, visible, sound1,
  79.         OK, visible, sound1
  80.     }
  81. };
  82.  
  83. include "Defaults.r.o"  'ALRT' (phAboutApp);    // Grab the default about box
  84.  
  85. include "Defaults.r.o" 'cmnu' (mApple);        // Grab the default Apple menu
  86.  
  87. resource 'cmnu' (mFile) {
  88.     mFile,
  89.     textMenuProc,
  90.     0x7FFFFBBB,
  91.     enabled,
  92.     "File",
  93.      {
  94. /* [1] */    "Quit",        noIcon, "Q",    noMark, plain, cQuit
  95.     }
  96. };
  97.  
  98. include "Defaults.r.o" 'cmnu' (mEdit);        // Grab the default Edit menus
  99.  
  100. resource 'cmnu' (4) {
  101.     4,
  102.     textMenuProc,
  103.     0x7FFFFFBD,
  104.     enabled,
  105.     "LinkDemo",
  106.      {
  107. /* [1] */    "New Window",        noIcon, noKey, noMark, plain, cNewWindow;
  108.     }
  109. };
  110.  
  111. include "Defaults.r.o" 'cmnu' (mBuzzwords);    // Get the default buzzwords menu
  112.  
  113.  
  114. resource 'MBAR' (kMBarDisplayed) { {mApple; mFile; mEdit; 4} };
  115.  
  116.  
  117. /************************************************************************************/
  118. /*    Views by procedure                                                                */
  119. /************************************************************************************/
  120. resource 'WIND' (cNewWindow, purgeable) {
  121.     {50, 20, 200, 300}, zoomDocProc, invisible, goAway, 0x0, "Window"
  122. };
  123.  
  124.  
  125. type 'SS11' as 'STR ';
  126. resource 'SS11' (0,
  127. #if qNames
  128. "Signature",
  129. #endif
  130.     purgeable) {
  131.     "Application created by MacApp®"
  132. };
  133.  
  134. resource 'BNDL' (128,
  135. #if qNames
  136. "Bundle",
  137. #endif
  138.     purgeable) {
  139.     'SS11',
  140.     0,
  141.         {
  142.         'ICN#',
  143.             {
  144.             0, 128,
  145.             },
  146.         'FREF',
  147.             {
  148.             0, 128,
  149.             }
  150.         }
  151. };
  152.  
  153. include "Defaults.r.o"  'STR#' (kDefaultCredits);        // Grab the default credits
  154.  
  155. // Get the default MacApp® application icon and necessary bundling rsrcs
  156. include "Defaults.r.o"  'FREF' (128);
  157. include "Defaults.r.o"  'ICN#' (128);
  158.  
  159. // Get the default Version resources
  160. include "Defaults.r.o"  'vers' (1);        // Application or file specific
  161. include "Defaults.r.o"  'vers' (2);        // Overall package
  162.